import {observable,action} from 'mobx-miniprogram'

//开始创建属性
export const numstore = observable({
    numA:1,
    numB:2,
    //定义actioon方法
    update: action(function () {
        this.numA += 1,
        this.numB += 1
    }),
    get sum(){
        return this.numA + this.numB
    }
})